#if !defined(__OTA_HTTP_H__)
#define __OTA_HTTP_H__

#define VERSION_URL "http://192.168.31.10:8000/version"
#define FW_URL "http://192.168.31.10:8000/firmware"
#define FW_DIGEST_URL "http://192.168.31.10:8000/digest"

typedef struct
{
    int major;
    int minor;
    int patch;
} Version;

Version *ota_http_getVersion();

/**
 * @brief 下载固件
 *
 * @param path 固件储存的路径
 * @return int 0成功 -1失败
 */
int ota_http_getFirmware(char *path);

#endif // __OTA_HTTP_H__
